#include "stdafx.h"
#include "csHashMap.h"

//------------------------------------------------------------------------
u32
GetTypeHash(const csString& str)
{
	ptstr s		= str.c_str();
	u32	hash	= 0;
	u32 len		= str.length();
	u32 i;
	for (i = 0; i < len; i++)
	{
		hash += s[i];
		hash += hash << 10;
		hash ^= hash >>  6;
	}
	hash += hash << 3;
	hash ^= hash >> 11;
	hash += hash << 15;
	hash &= ~(1<<31);       // don't return a negative number (in case IndexT is defined signed)
	return hash;
}